import pkg from 'package'
import {GET_FAR_STATUS} from './serves/data-status'
import {store,app} from '@/main';

const NODE_ENV = process.env.NODE_ENV;
const BUILD_TEST = process.env.BUILD_TEST||false;
const IMG_DIR = {
    'mee':'mee/',
    'people':'people/',
    'worker':'worker/',
};
/*TODO 导航 dev:true*/
const navTree = [
    {
        _show_key:'0',
        title: "欢迎您",
        iconClass:"ti-user ",
        urlName:'Home',
    },
   
    {
        _show_key:'1',
        title: "角色管理",
        iconClass:"ti-bar-chart-alt ",
        urlName:'',
        children:[
            {_show_key:'1',title: "管理员列表", urlName:'manager',},
            {_show_key:'2',title: "角色列表", urlName:'role',},
        ]
    },
    {
        _show_key:'2',
        title: "资讯管理",
        iconClass:"ti-bar-chart-alt ",
        urlName:'',
        children:[
            {_show_key:'1',title: "文章列表", urlName:'artical',},
            {_show_key:'2',title: "视频列表", urlName:'video',},
            {_show_key:'3',title: "评论列表", urlName:'message',},
        ]
    },
    {
        _show_key:'3',
        title: "测试管理",
        iconClass:"ti-bar-chart-alt ",
        urlName:'',
        children:[
            {_show_key:'1',title: "测试列表", urlName:'Test',},
        ]
    },
    /*
    {
        _show_key:'1',
        title: "统计分析",
        iconClass:"ti-bar-chart-alt ",
        urlName:'',
        children:[
            {_show_key:'1',title: "数据概览", urlName:'DatechartOverview',},
            {_show_key:'2',title: "投诉类型分析", urlName:'DatechartAccusationType',},
            {_show_key:'3',title: "地区投诉分析", urlName:'DatechartAccusationArea',},
            {_show_key:'4',title: "信息发布各处室统计", urlName:'DatechartDocumentOrg',},
            {_show_key:'5',title: "信息发布类别统计", urlName:'DatechartDocumentType',},
            {_show_key:'6',title: "省直机关投诉分析", urlName:'DatechartSubordinate',},
            {_show_key:'7',title: "投诉处理完成率分析", urlName:'DatechartAccusationComplete',},
            {_show_key:'8',title: "投诉人投诉次数排名", urlName:'',},
            {_show_key:'9',title: "某地区的各类型占比", urlName:'',},
            {_show_key:'10',title: "投诉关系网", urlName:'',},
            {_show_key:'11',title: "逾期件占比", urlName:'',},
            {_show_key:'12',title: "纠错件占比", urlName:'',},
            {_show_key:'13',title: "地方信息发布统计", urlName:'',},
            {_show_key:'14',title: "地方信息被选中统计", urlName:'',},
            {_show_key:'15',title: "录入信件统计排名", urlName:'',},
            {_show_key:'16',title: "被纠错信件统计排名", urlName:'',},
        ]
    },*/
];
/*
根据处动态设置菜单  -----  false:不显示，true:显示，2：全显示
 */
const orgLevelNav = {
    'lv_1':2,
};
export default {
    ENV:NODE_ENV,
    Tools:NODE_ENV === 'production'?false:true,
    BUILD:NODE_ENV === 'production'&&BUILD_TEST!=='builddev',
    url:NODE_ENV === 'production'?BUILD_TEST!='builddev' ? pkg.apiurl.build : pkg.apiurl.src : pkg.apiurl.src,
    oss_img:NODE_ENV === 'production'?BUILD_TEST!='builddev' ? pkg.apiurl.build_oss : pkg.apiurl.src_oss : pkg.apiurl.src_oss,
    img_dir:IMG_DIR,
    navTree:navTree,
    orgLevelNav:orgLevelNav,
    socketIoUrl:NODE_ENV === 'production'?BUILD_TEST!='builddev' ? pkg.apiurl.build_socket : pkg.apiurl.src_socket : pkg.apiurl.src_socket,
};
console.table(['ENV: '+NODE_ENV,'版本：'+pkg.version]);